#ifndef TXTLOG_H
#define TXTLOG_H

#include "Log.h"
#include <stdio.h>
#include "../Nocopy.h"
#include "../lock.h"

class TxtLog : public Log, private Nocopy, protected LockObject
{
public:
	TxtLog(const String & fname, const String & header);
	virtual ~TxtLog();
	virtual void error(const String & str, const char *szFile, const int nLine );
	virtual void message(const String & str, const char *szFile, const int nLine );
	virtual void warning(const String & str, const char *szFile, const int nLine );
private:
	FILE * file;

	void PutMessage(const String& str);
//	CRITICAL_SECTION m_cs;
};

#endif //TXTLOG_H